<template>
  <div>
    <!-- 一种情况无传参 -->
    <a @click="adds" href="https://weixin.qq.com/">阻止微信</a>
    <br>

    <!-- 第二种情况传参  $event-->
    <a @click="add(20, $event)" href="https://weixin.qq.com/">阻止微信</a>
  </div>
</template>

<script>
export default {
  name: "Vue2App",

  data() {
    return {};
  },

  methods: {
    adds(e) {
      e.preventDefault();
    },
    add(num,e){
      e.preventDefault();
      console.log(num);
    },
  },
};
</script>

<style lang="scss" scoped></style>
